<template>
	<view class="box">
		<image :src="`data:image/jpeg;base64,`+datadetail.listimage"  mode="" class="imgsinfo"></image>
		<view class="title">
			<view class="title_left">{{datadetail.name}}</view>
			<view class="title_time">{{datadetail.create_date}}</view>
		</view>
		<view class="counts">
			<rich-text class="rich" :nodes="datadetail.detail">       
			</rich-text >  
		</view>
	</view>
</template>
	
<script> 
	export default {
		data() {
			return {
				url: this.baseUrl,
				articleUrl :'https://www.1xx.online/japx/article',
				reqid:'',
				reqname:'',
				datadetail:{}
			};
		},
		onLoad(options) {
			var that = this
			that.reqid = options.headid;
			that.reqname = options.name;
			uni.setNavigationBarTitle({
				title:options.reqname,
			})
			that.initData()
		},
		methods: {
			initData:function(){
				var that = this
				uni.request({
					url: that.articleUrl,
					data: JSON.stringify({ params: { 'id':that.reqid},jsonrpc:'2.0',id:Number(new Date()) }),
					header: {
						'Content-Type': 'application/json'
					},
					method: 'POST',
					dataType: 'json',
					complete: res => {
						if (res.statusCode == 200) {
							var result = res.data.result
							if (!!result&&result.length>0) {
								that.datadetail = result[0];
							}
						}
					}
				})
			}
		}
	};
</script>

<style>
	img{width:90%!important;height:90%!important;}
	.box{
		height: 100%;
		padding: 20rpx;
	}
	.imgsinfo{
		width: 100%;
		height: 390rpx;
		border-radius: 10rpx;
	}
	.title{
		margin: 28rpx 0;
		display: flex;
		justify-content: space-between;
	}
	.title_time{
		font-size: 24rpx;
		color: #666666;
	}
	.title_left{
		font-size: 30rpx;
		color: #030303;
	}
	.counts{
		margin-top: 20rpx;
		text-indent: 40rpx;
		line-height: 40rpx;
		font-size: 30rpx;
		color: #9c9c9c;
		margin-bottom: 40rpx;
	}
</style>
